package com.xfcy.blog.common.constant;

/**
 * @author 晓风残月Lx
 * @date 2023/4/11 19:14
 */
public class RedisConstant {

    /**
     * 后台登陆验证码
     */
    public static String CAPTCHA_CODE = "CAPTCHA_CODE:";

    /**
     * 后台验证码有效期（分钟）
     */
    public static final Integer CAPTCHA_EXPIRATION = 5;

    /**
     * 访客  redis hyperloglog
     */
    public static final String UNIQUE_VISITOR = "unique_visitor";

    /**
     * 访客地区   redis hash
     */
    public static final String VISITOR_AREA = "visitor_area";

    /**
     * 博客网站浏览量  redis string
     */
    public static final String BLOG_VIEWS_COUNT = "blog_views_count";

    /**
     * 文章浏览量  redis hash
     */
    public static final String ARTICLE_VIEWS_COUNT = "article_views_count:";


    /**
     * 用户点赞文章  redis set
     */
    public static final String ARTICLE_USER_LIKE = "article_user_like:";

    /**
     * 文章点赞量    redis set
     */
    public static final String ARTICLE_LIKE_COUNT = "article_like_count:";

    /**
     * 用户浏览过   redis set
     */
    public static final String ARTICLE_USER_HISTORY = "article_user_history:";

    /**
     * 评论点赞量   redis hash
     */
    public static final String COMMENT_LIKE_COUNT = "comment_like_count:";


    /**
     * 用户点赞过的评论   redis set
     */
    public static final String USER_COMMENT_LIKED = "user_comment_liked:";

    /**
     * 邮箱验证码
     */
    public static final String EMAIL_CODE = "email_code_";

    /**
     * 存前台用户信息 Hash
     */
    public static final String LOGIN_USER = "login_user";


    /**
     *  标签点击量 hash
     */
    public static final String TAG_CLICK_VOLUME = "tag_click_volume";

    /**
     *  分类点击量 hash
     */
    public static final String CATEGORY_CLICK_VOLUME = "category_click_volume";

    /**
     * 存储上传的图片 未保存数据库
     */
    public static final String FILE_UPLOAD_IMAGES = "file_upload_images";


    /**
     * 存储上传的图片 并保存数据库
     */
    public static final String DB_FILE_UPLOAD_IMAGES = "db_file_upload_images";

    /**
     * 验证码有效期（秒）
     */
    public static final Long CAPTCHA_EXPIRATION_SECOND = 900L;

    /**
     * 验证码有效期（分钟）
     */
    public static final Long CAPTCHA_EXPIRATION_MINUTE = 15L;


    /**
     * 登录有效期（天）
     */
    public static final Long LOGINUSER_EXPIRATION_DAYS = 7L;

}
